home *** CD-ROM | disk | FTP | other *** search
- ':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- '::: :::
- '::: :::
- '::: PROGRAM: CAPSTAT.SUB :::
- '::: AUTHOR: Mike Shaffer :::
- '::: DATE: Feb 2, 1991 :::
- '::: VERSION: 2.0 :::
- '::: PURPOSE: Determines if printer capture is turned :::
- '::: on for a Novell workstation, and if so, :::
- '::: which device the captured output is being :::
- '::: directed to. :::
- '::: REVISIONS: :::
- '::: :::
- '::: :::
- '::: :::
- '::: NOTES: This program assumes you're using PDQ from :::
- '::: Crescent Software. If not (shame on you!) :::
- '::: than you can modify the interrupt call to :::
- '::: use INT86 as provided with QuickBASIC, and :::
- '::: take out the reference to PDQDECL.BAS :::
- '::: :::
- '::: :::
- ':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- '
- sub CAPSTAT(capst%,conid%) static
- '
- dim regs as regtype ' Create type to hold registers
- ' ' NOTE: regtype is defined in
- ' ' the PDQ declarations
- ' ' include. If you're not
- ' ' using PDQ, you'll
- ' ' probably want to use
- ' ' INT86 as provided by
- ' ' QuickBASIC, in which
- ' ' case the interrupt
- ' ' control structure will
- ' ' be an integer array.
- ' ' (see the QB docs)
- ' '
- ' '
- ' '
- regs.ax = &hF003 ' AH=&hF0, AL=&h03
- ' ' Function to get cap status
- interrupt &h21,regs ' So we get it!
- ' '
- temp& = regs.ax ' Move to long integer
- if temp&<0 then temp&=temp&+65536 ' Compensate for INT>32767
- al = temp& and &hFF ' Get value of AL
- ah = temp&\256 ' Get value of AH
- if ah = &hFF then ' Yes, capture active!
- capst% = -1 ' Set flag and
- conid% = al ' Set connection ID
- else ' ELSE
- capst% = 0 ' clear flag and
- conid% = 0 ' clear connection ID
- end if '
- ' '
- end sub ' Done!
- '
-
-
-